package cn.iocoder.yudao.module.crossborder.inventory.enums;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * CrossBorder Inventory 错误码枚举类
 *
 * crossborder inventory 系统，使用 1-023-000-000 段
 */
public interface ErrorCodeConstants {

    // ========== 库存管理相关 1-023-001-000 ============
    ErrorCode INVENTORY_NOT_EXISTS = new ErrorCode(1_023_001_000, "库存记录不存在");
    ErrorCode INVENTORY_INSUFFICIENT = new ErrorCode(1_023_001_001, "库存不足");
    ErrorCode INVENTORY_LOCKED = new ErrorCode(1_023_001_002, "库存已锁定");
    ErrorCode INVENTORY_QUANTITY_INVALID = new ErrorCode(1_023_001_003, "库存数量无效");

    // ========== 仓库管理相关 1-023-002-000 ============
    ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_023_002_000, "仓库不存在");
    ErrorCode WAREHOUSE_ALREADY_EXISTS = new ErrorCode(1_023_002_001, "仓库已存在");
    ErrorCode WAREHOUSE_STATUS_INVALID = new ErrorCode(1_023_002_002, "仓库状态无效");
    ErrorCode WAREHOUSE_CAPACITY_EXCEEDED = new ErrorCode(1_023_002_003, "仓库容量超限");

    // ========== 库存分配相关 1-023-003-000 ============
    ErrorCode ALLOCATION_NOT_EXISTS = new ErrorCode(1_023_003_000, "库存分配记录不存在");
    ErrorCode ALLOCATION_FAILED = new ErrorCode(1_023_003_001, "库存分配失败");
    ErrorCode ALLOCATION_RULE_INVALID = new ErrorCode(1_023_003_002, "分配规则无效");
    ErrorCode ALLOCATION_QUANTITY_INVALID = new ErrorCode(1_023_003_003, "分配数量无效");

    // ========== 库存同步相关 1-023-004-000 ============
    ErrorCode SYNC_NOT_EXISTS = new ErrorCode(1_023_004_000, "同步记录不存在");
    ErrorCode SYNC_FAILED = new ErrorCode(1_023_004_001, "库存同步失败");
    ErrorCode SYNC_CONFLICT = new ErrorCode(1_023_004_002, "库存同步冲突");
    ErrorCode SYNC_TIMEOUT = new ErrorCode(1_023_004_003, "库存同步超时");

    // ========== 库存预警相关 1-023-005-000 ============
    ErrorCode ALERT_NOT_EXISTS = new ErrorCode(1_023_005_000, "预警规则不存在");
    ErrorCode ALERT_RULE_INVALID = new ErrorCode(1_023_005_001, "预警规则无效");
    ErrorCode ALERT_THRESHOLD_INVALID = new ErrorCode(1_023_005_002, "预警阈值无效");
    ErrorCode ALERT_ALREADY_TRIGGERED = new ErrorCode(1_023_005_003, "预警已触发");

    // ========== 库存调拨相关 1-023-006-000 ============
    ErrorCode TRANSFER_NOT_EXISTS = new ErrorCode(1_023_006_000, "调拨记录不存在");
    ErrorCode TRANSFER_STATUS_INVALID = new ErrorCode(1_023_006_001, "调拨状态无效");
    ErrorCode TRANSFER_QUANTITY_INVALID = new ErrorCode(1_023_006_002, "调拨数量无效");
    ErrorCode TRANSFER_WAREHOUSE_SAME = new ErrorCode(1_023_006_003, "源仓库和目标仓库不能相同");

}
